<?
$smarty=new Smarty();
if(!ANTIHACK) die("ANTIHACK...");
include_once(INCLUDES."buildlink.php");
$q = query("select * from menu where is_active=1 order by sort asc");

$menu[$r["parent"]][]=$r;
while($r=fetch($q))
{
	//buildlink($type,$post,$page="",$vong="",$nam="")
	$r['link']=buildlink("menu",$r);
	$menu[$r["parent"]][]=$r;
}

$smarty->assign("current",$mncurrent);
$smarty->assign("menu",$menu);
$smarty->display("menu.htm");
?>